(function($){
	$(document).ready(function(){
		$('a').focus(function(){$(this).blur();});

		$(':text.price').focus(function(){
			$(this).val(to_number($(this).val()));
		}).blur(function(){
			$(this).val(number_format($(this).val()));
		});
		$(':text, :password, textarea').focus(function(){
			$(this).addClass('focus');			
		}).blur(function(){
			$(this).removeClass('focus');
		});
	});

})(jQuery);
function popup(url, width, height, name)
{
	name =window.open(url, name, 'top=0,left=0,toolbar=0,directories=0,menubar=0,resizable=0,scrollbars=1,width='+width+',height='+height);
	name.focus();
}
function number_format(str)
{
	var str = String(str);
	var reg = /(\-?\d+)(\d{3})($|\.\d+)/; 
	if(reg.test(str))
	{ 
		return str.replace(reg, function(str, p1,p2,p3){return number_format(p1) + "," + p2 + "" + p3;}); 
	}
	return str;
}
function to_number(str)
{
	if(str.indexOf(',') > 0)
	{
		return to_number(str.replace(',',''));
	}
	return str;
}
function saveForm(form_id)
{
	if(confirm('저장하시겠습니까?'))
	{
		$(form_id).submit();
	}
}